package bocchi.card;

import bocchi.base.BaseCustomCard;
import bocchi.BocchiCore;
import bocchi.general.Util;
import com.megacrit.cardcrawl.actions.common.ExhaustSpecificCardAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class EraseDarkPast extends BaseCustomCard {
    private static final String RAW_ID = EraseDarkPast.class.getSimpleName();
	public static final String GAME_ID = BocchiCore.getGameID(RAW_ID);

    public EraseDarkPast() {
        super(RAW_ID);
    }

    @Override
    public void use(AbstractPlayer player, AbstractMonster monster) {
        Util.damage(player, monster, damage);
        for (AbstractCard card : player.discardPile.group) {
            if (card.type != CardType.STATUS) {
                continue;
            }

            addToBot(new ExhaustSpecificCardAction(card, player.discardPile));
            addToBot(new GainBlockAction(player, magicNumber));
        }
    }
}
